package com.deke.home.controller;

import com.deke.home.service.QianArticleService;
import com.deke.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：ludi（206913808@qq.com）
 * @date ：Created in 2022/12/23 18:20
 * @description：底部文章跳转
 * @modified By：
 * @version:
 */
@Api(tags = "前端底部文章")
@RequestMapping("/home/qian/article")
@RestController
public class QianArticleController {

    @Autowired
    private QianArticleService qianArticleService;


    @ApiOperation(value = "根据文章链接跳转")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "文章链接id", value = "id"),
    })
    @PostMapping("getAllQianArticle/{id}")
    public Result getAllQianArticle(@PathVariable(required = true) String id){
        return qianArticleService.getAllQianArticle(id);
    }
}